package com.elonnx.service;

import com.elonnx.dao.UserDao;

/**
 * 用户Service
 * @author 马元
 * @date 2024-07-11
 */
public class UserService {

    /**
     * 用户登录
     * @param username 用户名
     * @param password 密码
     * @return boolean
     */
    public boolean login(String username, String password) {
        UserDao userDao = new UserDao();
        int number = userDao.countByUsernameAndPassword(username, password);
        if (number == 1) {
            return true;
        }
        return false;
    }

}
